import React, { PureComponent } from 'react'
import { Button } from 'antd-mobile'
import ErrorDefault from '@/components/ErrorDefault'
export default class NotFound extends PureComponent {
    toHome = () => {
        this.props.history.push('/')
    }

    handleError = () => {
        return (
            <>
                <p>您访问的页面不见了/(ToT)/~~</p>
                <p>请重新搜索</p>
            </>
        )
    }

    render() {
        return (
            <ErrorDefault
                renderError={this.handleError}
            >
                <Button style={{marginTop: '20px'}} type="primary" onClick={this.toHome}>返回首页</Button>
            </ErrorDefault>           
        )
    }
}
